Skip to content

fix(libs): make the type-tests targets runnable again - #1064

Merged
blove merged 1 commit into
mainfrom
blove/small-followups
Sep 8, 2026
Merged

fix(libs): make the type-tests targets runnable again#1064
blove merged 1 commit into
mainfrom
blove/small-followups

Conversation

@blove

@blove blove commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

All three type-tests targets (chat, ag-ui, langgraph) have been failing on main, so the type-level assertions they exist to enforce were not being checked. Three separate agents hit this last week and had to verify their type assertions by hand.

Two inherited causes, both fixed only inside the type-tests configs:

  • TS5101tsconfig.base.json sets baseUrl, which TypeScript 6 reports as deprecated. These targets invoke the workspace tsc (6.0.2), newer than the compilers the library builds use. Putting ignoreDeprecations in tsconfig.base.json instead breaks every library build with TS5103: Invalid value for '--ignoreDeprecations', so it is scoped to the three configs that need it.
  • TS6059 — each library's rootDir is its own directory, but type-specs import sibling libraries through tsconfig path mappings. With noEmit, rootDir only has to be wide enough to contain what is checked.

Dropping baseUrl altogether is the real migration before TypeScript 7, but it changes resolution for every project in the workspace and does not belong in this fix.

Verification: chat:type-tests, ag-ui:type-tests, langgraph:type-tests all exit 0 (each failed before); nx run-many -t build,lint --projects=chat,ag-ui,langgraph,render green.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadplane Ready Ready Preview Sep 8, 2026 4:58pm UTC

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

All three failed on main for two inherited reasons: TS 6 errors on the
baseUrl deprecation from tsconfig.base.json, and the per-library rootDir
excludes the sibling sources that type-specs import through path mappings.
Both are scoped to the type-tests configs — putting ignoreDeprecations in
tsconfig.base.json breaks the library builds, whose compiler rejects the
option with TS5103.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@blove
blove force-pushed the blove/small-followups branch from f82e0be to c8d8f5e Compare September 8, 2026 16:55
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit a3970b8 into main Sep 8, 2026
77 checks passed
blove added a commit that referenced this pull request Sep 8, 2026
The three `type-tests` targets invoked `npx tsc`, which does not resolve to
the workspace compiler. `@dawn-ai/core` pulls in `@typescript/old`
(npm:typescript@6.0.2), whose `tsc` bin wins the hoist at
`node_modules/.bin/tsc`, so those targets type-checked the public API with
TypeScript 6.0.2 while every other target compiles with the declared 5.9.3.
That mismatch is what produced the TS5101 `baseUrl` deprecation error, which
#1064 silenced with `ignoreDeprecations: "6.0"`.

Invoke `node ./node_modules/typescript/bin/tsc` so the targets use the
compiler the workspace declares, and drop the `ignoreDeprecations` holding
action. The `rootDir` lines stay: they solve the unrelated problem of
type-specs importing sibling libraries through path mappings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove added a commit that referenced this pull request Sep 8, 2026
The three `type-tests` targets invoked `npx tsc`, which does not resolve to
the workspace compiler. `@dawn-ai/core` pulls in `@typescript/old`
(npm:typescript@6.0.2), whose `tsc` bin wins the hoist at
`node_modules/.bin/tsc`, so those targets type-checked the public API with
TypeScript 6.0.2 while every other target compiles with the declared 5.9.3.
That mismatch is what produced the TS5101 `baseUrl` deprecation error, which
#1064 silenced with `ignoreDeprecations: "6.0"`.

Invoke `node ./node_modules/typescript/bin/tsc` so the targets use the
compiler the workspace declares, and drop the `ignoreDeprecations` holding
action. The `rootDir` lines stay: they solve the unrelated problem of
type-specs importing sibling libraries through path mappings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove added a commit that referenced this pull request Sep 8, 2026
… blocker (#1066)

* fix(libs): run the type-tests targets on the workspace TypeScript

The three `type-tests` targets invoked `npx tsc`, which does not resolve to
the workspace compiler. `@dawn-ai/core` pulls in `@typescript/old`
(npm:typescript@6.0.2), whose `tsc` bin wins the hoist at
`node_modules/.bin/tsc`, so those targets type-checked the public API with
TypeScript 6.0.2 while every other target compiles with the declared 5.9.3.
That mismatch is what produced the TS5101 `baseUrl` deprecation error, which
#1064 silenced with `ignoreDeprecations: "6.0"`.

Invoke `node ./node_modules/typescript/bin/tsc` so the targets use the
compiler the workspace declares, and drop the `ignoreDeprecations` holding
action. The `rootDir` lines stay: they solve the unrelated problem of
type-specs importing sibling libraries through path mappings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(workspace): record why tsconfig baseUrl cannot be dropped yet

TypeScript 7 removes `baseUrl`, and since TypeScript 5.0 the `paths` map no
longer needs it. Removing it from `tsconfig.base.json` nonetheless breaks
every library that depends on another library: Nx's buildable-library
executors write a generated tsconfig under `tmp/<projectRoot>/build/` whose
`paths` re-declare dependency entries as workspace-root-relative dist
outputs (`dist/libs/telemetry/browser`). Without a `baseUrl` those
non-relative values raise TS5090 and TypeScript discards the whole `paths`
map, so `render:build` and `cockpit-shell:build` fail to resolve
`@threadplane/telemetry/browser` and `@threadplane/cockpit-registry`.

Leave the option in place and record the blocker next to it so the next
attempt starts from the Nx side rather than re-deriving this.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant